;--------------------------------------------------------------------
;Universal delay procedures using timer0
;All procedures not using the stack.
;--------------------------------------------------------------------
wait10ust:
	movlw	b'10000001'				;setting of timer0 prescaler
	option
	movlw	d'0'
	movwf	TMR0
wait10ust_l1:
	movf	TMR0,W
	btfss	STATUS,Z
	goto	wait10ust_l1
	retlw	0
;----------------------------------
;wait100ust:;
;	movlw	b'10000001'				;setting of timer0 prescaler
;	option
;	movlw	d'235'
;	movwf	TMR0
;wait100ust_l1:
;	movf	TMR0,W
;	btfss	STATUS,Z
;	goto	wait100ust_l1
;	nop
;	nop
;	retlw	0
;----------------------------------
wait10mst:
	movlw	b'10000101'				;setting of timer0 prescaler
	option
	movlw	d'102'
	movwf	TMR0
wait10mst_l1:
	movf	TMR0,W
	btfss	STATUS,Z
	goto	wait10mst_l1
	movlw	b'10000001'				;setting of timer0 prescaler
	option
	movlw	d'227'
	movwf	TMR0
wait10mst_l2:
	movf	TMR0,W
	btfss	STATUS,Z
	goto	wait10mst_l2
	nop
	nop
	nop
	retlw	0
;----------------------------------
wait1mst:
	movlw	b'10000101'				;setting of timer0 prescaler
	option
	movlw	d'243'
	movwf	TMR0
wait1mst_l1:
	movf	TMR0,W
	btfss	STATUS,Z
	goto	wait1mst_l1
	movlw	b'10000001'				;setting of timer0 prescaler
	option
	movlw	d'221'
	movwf	TMR0
wait1mst_l2:
	movf	TMR0,W
	btfss	STATUS,Z
	goto	wait1mst_l2
	nop
	nop
	nop
	retlw	0
;--------------------------------------------------------------------
;END OF DELAY PROCEDURES
;--------------------------------------------------------------------